#include <cstdint>
#include <cstdio>
#include <iostream>
#include <istream>

using ll = int64_t;
#define printf
const ll p220=1048576,maxa=p220+7;
ll n,k,f[maxa],now,tmp,ans,last;
struct S{
    ll l,r;
};

int main(){
    std::iostream::sync_with_stdio(false);
    std::cin.tie(nullptr);

    for(ll i=0;i<maxa;i++){
        f[i]=-1;
    }
    std::cin>>n>>k;
    f[0]=1;
    last=0;
    for(ll i=1;i<=n;i++){
        std::cin>>tmp;
        now^=tmp;
        printf("i=%lld, now=%lld\n",i,now);
        printf("f[%lld]=%lld\n",now^k,f[now^k]);
        if(f[now^k]!=-1){
            if(f[now^k]>last){
                ans++;
                last=i;
            }
            printf("add %lld, %lld\n",f[now^k],i);
            f[now^k]=-1;
        }
        f[now]=i+1;
    }
    std::cout<<ans<<"\n";
}